<template>
  <div class="Variety">
    <div class="swiper">
      <div class="swiper-wrapper">
        <div class="swiper-slide">
          <img
            src="https://liangcang-material.alicdn.com/prod/upload/38a7d3958e7c44b78870965983439ce6.jpg?x-oss-process=image/resize,w_801/format,webp/interlace,1"
            alt=""
          />
        </div>
        <div class="swiper-slide">
          <img
            src="https://liangcang-material.alicdn.com/prod/upload/a5cde34f8fcc402083f5f0f66f3ef8aa.jpg?x-oss-process=image/resize,w_801/format,webp/interlace,1"
            alt=""
          />
        </div>
        <div class="swiper-slide">
          <img
            src="https://liangcang-material.alicdn.com/prod/upload/5746f57b775743ef87116dbab54d8630.jpg?x-oss-process=image/resize,w_801/format,webp/interlace,1"
            alt=""
          />
        </div>
        <div class="swiper-slide">
          <img
            src="https://liangcang-material.alicdn.com/prod/upload/67cc7a2945e74092b3bc1cdcd4421083.jpg?x-oss-process=image/resize,w_801/format,webp/interlace,1"
            alt=""
          />
        </div>
        <div class="swiper-slide">
          <img
            src="https://liangcang-material.alicdn.com/prod/upload/4b5e9b045c114b4fb0caa112fff60e3c.jpg?x-oss-process=image/resize,w_801/format,webp/interlace,1"
            alt=""
          />
        </div>
      </div>
      <!-- 如果需要分页器 -->
      <div class="swiper-pagination"></div>
    </div>
     <div class="blue">
         打开优酷APP，流畅到起飞
     </div>
     <div class="content">
         <h3>精彩热播</h3>
        <ul class="cont-item">
            <li class="con-list" v-for="(item,index) in arr" :key="index">
             <img :src="item.img" alt="">
             <div class="data">{{ item.data }}</div>
             <div class="title">{{ item.title }}</div>
             <div class="text">{{ item.text }}</div>
         </li>
        </ul>
     </div>
     <footer>
         <p>Copyrightc2019优酷youku.com 版权所有</p>
         <p class="foot">反盗版盗链声明京ICP备06050721号-1</p>
     </footer>
  </div>
</template>
<script>
import Swiper from "../../node_modules/swiper/swiper-bundle";
export default {
  name: "Variety",
  data(){
      return{
arr:[
    {
        img:"https://m.ykimg.com/0541010161E2617F2794D4A2A8A4B369",
        data:"01-17期",
        title:"麻花就你话多?",
        text:"沈腾吐槽马丽腿脚不好遭怼"
    },
    {
        img:"https://m.ykimg.com/0541010161DFA45F052D3F9C39029E7D",
        data:"01-18期",
        title:"德云社镶重磅官录?",
        text:"孟鹤堂周九良惊喜合体!"
    }, 
    {
        img:"https://m.ykimg.com/0541010161E958412794D4A2A726E104",
        data:"01-19期",
        title:"新民乐国风夜定档",
        text:"民乐大师x乐圈后浪联动"
    },
    {
        img:"https://m.ykimg.com/0541010161D43ABD052D3F9C35D188E7",
        data:"01-20期",
        title:"麻花局中局·老尴尬了",
        text:"沈腾游戏耍赖遭常远无情拆穿"
    },
    {
        img:"https://m.ykimg.com/0541010161D967272794D4A2A76C670A",
        data:"01-21期",
        title:"追光吧斑燃炸公演",
        text:"张卫健飙泪谢刘德华救命之恩"
    },
    {
        img:"https://m.ykimg.com/0541010161C5B5B72C400714A0E00DA1",
        data:"01-22期",
        title:"老郭有新番离大谱",
        text:"岳云鹏孔云龙爆笑送礼"
    },
]
      }
  },
  methods: {
    fn() {
      new Swiper(".swiper", {
        direction: "horizontal", // 垂直切换选项
        loop: true, // 循环模式选项
        autoplay: true,
        speed: 1000,
        // 如果需要分页器
        pagination: {
          el: ".swiper-pagination",
        },

        // 如果需要前进后退按钮
        navigation: {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev",
        },
      });
    },
  },
  mounted() {
    this.fn();
  },
};
</script>
<style scoped>
@import "../../node_modules/swiper/swiper-bundle.css";
.Variety {
  margin-top: 2.2rem;
}
.swiper {
  width: 100%;
  height: 3.75rem;
}
.swiper img {
  width: 100%;
  height: 3.75rem;
}
.blue{
    width: 95%;
    background: #43c5fb;
     color: #fff;
     font-size: .24rem;
    height: .68rem;
    border: 1px solid #d8ffff;
    margin: .38rem .18rem; 
    text-align: center;
    border-radius: .1rem;
    line-height: .68rem;
}
.content{
    width: 100%;
}
.content h3{
    margin: .12rem;
}
.content .cont-item{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.content .cont-item li{
    width: 3.7rem;
    position: relative;
}
.content .cont-item li .data{
    position: absolute;
    top: 1.7rem;
    right: .1rem;
    font-size: .13rem;
    color: #fff;
}
.content .cont-item li .title{
    margin-top: .2rem;
    font-size: .23rem;
    font-weight: 500;
}
.content .cont-item li .text{
    margin: .16rem 0 .2rem 0;
    font-size: .16rem;
    color: #999999;
}
.content .cont-item li img{
       width: 3.7rem;
}
.content .cont-item li div{
    padding: 0 .11rem;
}
footer{
    width: 6rem;
    border-top:1px solid #eeeeee ;
    margin: 0 auto;
    margin-top: 1.2rem;
    padding-top: .1rem;
}
footer .foot{
    color: #909090;
}
footer p{
    margin-top: .1rem;
    text-align: center;
    font-size: .2rem;
}
</style>